Systems and methods herein generally relate to image processing that use halftone techniques for multi-bit images.
In digital multifunction reprographic systems, a scanner accepts a document to be copied, scanned, or otherwise subsequently processed and converts the document into at least one electronic image. These images, usually in the form of pages, are then passed to a central control unit that may re-order or reorganize these pages and then, depending on the request of the user of the device, send the pages or images to a destination. Often this destination is an attached printing unit that makes one or more copies of the original document.
A multifunction digital device includes an image path that is the combination of software and hardware elements. The software and hardware elements accept the electronic images from a multiplicity of sources and perform a plurality of operations to convert the images to the format desired for the various output paths.
The image path for a multifunction device usually has several constraints. On one hand, there is a desire to make the image path utilize data in a multi-bit count per pixel format so as to provide for maximum image quality and a minimum loss of information in the transformation of documents from paper to electronic form. On the other hand, cost constraints and performance limits on the devices or software may compromise the image path.
In systems that convert gray scale image data to reduced bit size image data (so as to be processed by the image path) and back to gray scale image data for rendering, a halftone process can be utilized that uses error diffusion to convert gray scale image data to reduced bit image data. In this process, a pixel of gray scale image data is compared to a threshold values or threshold values and, depending upon the relationship of the value of the pixel of gray scale image data, a reduced bit size data value is generated.
For example, if the possible pixel value of the gray scale image data has a value between 0 and 255, the threshold value may be 128 such that a pixel value of the gray scale image data that is equal to or greater than 128 would generate a binary value of 1 (representing a gray scale value of 255) and a pixel value of the gray scale image data that is equal less than 128 would generate a binary value of 0 (representing a gray scale value of 0). In each instance, there would be a difference between the original a pixel value of the gray scale image data and the converted value. This difference is the error of the conversion process.
In a conversion process that utilizes error diffusion, the error is diffused (scattered or propagated) to neighboring pixels of the gray scale image data. More specifically, the error may be conventionally propagated to the next pixel in the scanline and to adjacent pixels in the next scanline. Moreover, in error diffusion processes, the error is weighted such that an adjacent pixel does not necessarily receive all the error, only a portion thereof.
With respect to converting the halftone image data to gray scale image data, low pass filtering and look-up table based approaches are some implementations of reconstructing gray scale image data from halftone image data. Examples of different conventional lowpass filters are halfband lowpass, Gaussian lowpass, and lowpass filtering based on singular value decomposition.
However, if the halftone image data is initially generated from gray scale image data using an error diffusion process, the error diffusion can inject noise into the gray scale image, primarily in the high frequency range. In other words, since an error diffusion process injects high frequency noise, a low pass filter cannot necessarily remove all of the noise purposefully introduced by the error diffusion process. Also, if a low pass filter is utilized to address the noise injected by the error diffusion process, there may be high frequency components in the original gray scale image, such that removal of noise by a low pass filter would also remove these desirable high frequency components of the original image data. Particularly a text region may lose sharpness due to the removal of the desirable high frequency components of the original image data.
In look-up table based approaches for reconstruction of gray image from error diffused halftone data, a small window is slid over the error diffused image data. The content of the halftone pixels in the window serves as an address to a look-up table. A gray level value is then retrieved as the constructed gray level of the center pixel in the window. The look-up table is constructed by a training algorithm using a collection of test images. The training of the conventional look-up table is time consuming. Moreover, since conventional error diffusion produces a halftone image in which the local average within any small area of the image approximates the gray level of the corresponding small area of the original gray scale image, very different bit patterns corresponding to the same local gray level can be obtained by simply shifting the halftoning window a small amount in any direction. The different bit patterns will result in different addressing to the look-up table during inverse halftoning. Also, very different halftone images from the same gray scale image can be generated by merely changing the initial condition in the error diffusion process.
Therefore, inverse halftoning is applied in wide variety of image processing problems, such as interchanging between halftone methods, scaling, tone correction, facsimile image processing, nonlinear filtering, enhancement, and image compression. In some scan to file applications, an error diffused image generated by image path hardware is stored in memory, then retrieved and converted to a contone (continuous tone) image. In the image path, the error diffused image is stored in memory and, when the printing device is ready for printing, the error diffused image is reconstructed into a continuous tone image in the backend processing and transferred to the printing device for printing. Storing the error diffused image helps save memory space.
As noted above, some processing uses low pass filtering based methods or look-up table methods for reconstructing continuous tone images from error diffused images. If the input is text or photo and text types, then the edge tag from a segmentation module is used to differentiate edge and non-edge regions. Low pass filtering may be applied only to non-edge regions to avoid distortion of edges and text. However, for a low computational system (e.g., those that use a software based image path) where segmentation is not affordable, tag based reconstruction methods are not economically viable.